package Leetcode.lc027;

public class Sloution {
    public int removeElement(int[] nums, int val) {
       int slow=0,fast=0;
       for(;fast<nums.length;fast++){
           if(nums[fast]!=val){
               nums[slow++]=nums[fast];
           }
       }
       return slow;
    }

    public static void main(String[] args) {
        Sloution sloution = new Sloution();
        int[] ints = {1, 2, 3, 4, 5,3,3,3,3,3};
        int res=sloution.removeElement(ints,3);
        System.out.print(res);
    }
}
